package com.tsu.mall.common.VO;
import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.List;

@Data
public class ResultVO {

	int code;
	private String msg;
	private List<?> data;

	private long count;

	public void setData(List<?> data) {
		this.data = data;
		this.count=new PageInfo<>(data).getTotal();
	}
	public ResultVO data(List<?> data) {
		this.data = data;
		this.count=new PageInfo<>(data).getTotal();
		return this;
	}

}
